<!DOCTYPE html>
<html>
<head>
    <title>供应商打款信息表</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <form class="form-inline" role="form">
                <div class="form-group">
                    <a @click="reset">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                <el-input v-model="q.receiverName" placeholder="收款人姓名"></el-input>
                </div>&nbsp;&nbsp;&nbsp;
                <template>
                    <el-select
                            v-model="q.sellerId"
                            clearable
                            filterable
                            remote
                            reserve-keyword
                            placeholder="所属门店"
                            :remote-method="remoteMethod"
                            :loading="loading">
                        <el-option
                                v-for="item in options"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                        </el-option>
                    </el-select>
                </template>
                <a class="btn btn-primary btn-sm" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
                <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </form>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default" align="center">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group" v-show="title=='新增'">
                <div class="col-sm-2 control-label"><span style="color: red">*&nbsp;</span>所属门店</div>
                <div class="col-sm-10">
                        <el-select clearable style="padding-right: 180px;width: 550px;"
                                v-model="remittance.sellerId"
                                filterable
                                remote
                                reserve-keyword
                                placeholder="所属门店"
                                :remote-method="remoteMethod"
                                :loading="loading">
                            <el-option
                                    v-for="item in options"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                            </el-option>
                        </el-select>
                </div>
            </div>
            <div class="form-group" v-show="title=='修改'">
                <div class="col-sm-2 control-label">所属门店</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="remittance.sellerName" placeholder="所属门店" readonly/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"><span style="color: red">*&nbsp;</span>收款银行账号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="remittance.receiverAccount" placeholder="收款银行账号" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"><span style="color: red">*&nbsp;</span>收款人姓名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="remittance.receiverName" placeholder="收款人姓名" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"><span style="color: red">*&nbsp;</span>收款银行卡开户支行</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="remittance.receiverAccountBranch" placeholder="收款银行卡开户支行" />
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">银行账户属性</div>
                <div class="col-sm-10">
                    <select class="form-control input-sm" v-model="remittance.receiverBankAccountPro">
                        <option value=0>对私</option>
                        <option value=1>对公</option>
                    </select>
                </div>
            </div>
            <div class="form-group" v-if="remittance.receiverBankAccountPro==1">
                <div class="col-sm-2 control-label"><span style="color: red">*&nbsp;</span>收款方账户的发卡行</div>
                <div class="col-sm-10">
                    <select class="form-control input-sm" v-model="remittance.receiverGateId">
                        <option v-for="item in bankInfos" :value="item.code">{{item.name}}</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">证件类型</div>
                <div class="col-sm-10">
                    <select class="form-control input-sm" v-model="remittance.credentialType">
                        <option value=1>身份证</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">身份证号码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control input-sm" v-model="remittance.receiverCredential" placeholder="身份证号码" />
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary  btn-sm" @click="saveOrUpdate" value="确定" />
                &nbsp;&nbsp;<input type="button" class="btn btn-warning  btn-sm" @click="reload" value="返回" />
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/remittance/remittance.js?_${.now?long}"></script>
</body>
</html>
